/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.addressBook.baseService;

import com.addressBook.bean.UserInfo;
import java.util.ArrayList;

/**
 *
 * @author Lam
 */
public class Delete {

    public ArrayList delBean(ArrayList<UserInfo> oldBeans, UserInfo deledBean) {
        ArrayList<UserInfo> newBeans = new ArrayList<UserInfo>();
        for (UserInfo bean : oldBeans) {
            if (bean.equals(deledBean)) {
                continue;
            }
            newBeans.add(bean);
        }
        return newBeans;
    }
}
